1. Field of the Invention
This disclosure relates to computer systems, and, more particularly, to systems and methods for enabling the universal vectorization of software applications.
2. Description of the Related Art
The typical software development paradigm is well known. A computer programmer writes source code in a high-level programming language (e.g., Basic, C++, etc.). At some point, the programmer uses a compiler to transform the source code into object code. After being transformed into executable code (e.g., after linking or other compile-time or run-time processing), the resulting object code can then be executed by a computer or computing device.
Computers now have multiple processing units and are capable of executing instructions in parallel. To take advantage of this architecture, modern compilers may attempt to “parallelize” or “vectorize” certain software functions so that, instead of having a single processing unit sequentially execute one instruction at a time, multiple processing units can execute instructions simultaneously.
During the compilation process, the compiler analyzes a software function to determine if there are any obstacles to vectorization. One such obstacle, for example, is the presence of a true data dependency. This happens when a present instruction refers to the data obtained through the execution of a preceding instruction. In that case, the latter instruction can only be carried out after the former, and therefore the two instructions cannot be executed in parallel. Another potential obstacle is the presence of a function call. For instance, if a function to be compiled makes a call to an external function, then the compiler may not be able to vectorize the calling function.